<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>判断数据类型</title>
</head>
<body>
    <script>
        let userName,sex='男',age=18;
        let date = new Date();//时间
        let arr = new Array();//数组
        let flag = false;
        let stu = null;
        console.log("userName:",typeof(userName),userName);
        console.log("sex:",typeof(sex),sex);
        console.log("age:",typeof(age),age);
        console.log("date:",typeof(date),date);
        console.log("arr:",typeof(arr),arr);
        console.log("flag:",typeof(flag),flag);
        console.log("stu:",typeof(stu),stu);
        console.log("null == undefined:",null==undefined);
    </script>
</body>
</html>